home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1997 #1 / Amiga Plus CD - 1997 - No. 01.iso / pd / disktools / allowbad / allowbad.doc < prev    next >
Text File  |  1986-10-24  |  12KB  |  249 lines

  1.                          AllowBad 0.5 (ßeta version)
  2.  
  3.                      © Mikolaj Calusinski 1995. Freeware.
  4.  
  5.                                  User Manual
  6.  
  7. Introduction
  8. ------------
  9. AllowBad  is  freeware (see 'Distribution') and copyright 1995-1996 by Mikolaj
  10. Calusinski. All rights reserved.
  11.  
  12. *****************************************************************************
  13. IMPORTANT!
  14.  
  15. IF YOU ARE A FASCIST OR NAZI YOU ARE *NOT* ALLOWED TO USE THIS PROGRAM!!!
  16. *****************************************************************************
  17.  
  18. Distribution
  19. ------------
  20.  
  21. [The  following text has been derived and adjusted from 'FileMaster 3.0.guide'
  22. © Toni Wilen 1995 (I don't want to reinvent the wheel). I hope Toni, you don't
  23. mind.]
  24.  
  25. AllowBad may be distributed freely, providing the following criteria are met:
  26.  
  27.  - None of the files in the AllowBad distribution archive may be modified or
  28.    omitted.
  29.  
  30.  - No money is charged for it apart from media and small handling fee.
  31.  
  32.  - AllowBad may be included in freely distributable software libraries,
  33.    including the Fred Fish collection and CD-ROM distributions of the Aminet
  34.    FTP site contents.
  35.  
  36.  - AllowBad may not be bundled with any commercial hardware or software
  37.    product without prior written consent from the author.
  38.  
  39.  - You may not reverse-engineer or modify the AllowBad executable on disk or
  40.    on memory except for compressing it.
  41.  
  42. Disclaimer
  43. ----------
  44.  
  45. [The  following text has been derived from 'FileMaster 3.0.guide' © Toni Wilen
  46. 1995 (I don't want to reinvent the wheel). I hope Toni, you don't mind.]
  47.  
  48. THIS  PRODUCT  IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ALL RISKS AND
  49. DAMAGES,  INCIDENTAL  OR OTHERWISE, ARISING FROM THE USE, MISUSE, OR INABILITY
  50. TO  USE  THIS  PROGRAM ARE ENTIRELY THE RESPONSIBILITY OF THE USER. THE AUTHOR
  51. DOES  NOT  MAKE  ANY  GUARANTEES OR REPRESENTATIONS REGARDING THE CORRECTNESS,
  52. RELIABILITY,  ACCURACY, CURRENTNESS, ETC. OF THIS PROGRAM. THE AUTHOR WILL NOT
  53. ACCEPT RESPONSIBILITY FOR ANY DAMAGE OR LOSSES RESULTING FROM THE USE, MISUSE,
  54. OR INABILITY TO USE THIS PRODUCT.
  55.  
  56.  
  57. What is that for?
  58. -----------------
  59.  
  60. This  program  was written as a replacement for good, but old BFormat 4.0. Its
  61. purpose  is  to  format  disks  of any *floppy-based* devices, which have hard
  62. (media)  error on them. Such disks cannot be formatted (and hence utilized) by
  63. system  'Format',  so  only  thing  you  could  do  was  getting  rid of them.
  64. Optionally, you could use BFormat of course, but such prepared disks were very
  65. unstable  under  AmigaDOS,  and gave 'read-write' errors quite often. This was
  66. because  of  way BFormat works - it allocates only blocks which appeared to be
  67. corrupted,  leaving  rest  of the track for use by filesystem. It sounds quite
  68. logical  and  give you more free space on disk but doesn't work that well with
  69. floppies.  For  safety  of  stored  data  it  is  better  to avoid whole track
  70. regardless whether there is only one or more bad blocks on it. That is the way
  71. AllowBad handles the errors - it masks the tracks, not blocks.
  72.  
  73. AllowBad should be able to format disks in all floppy-like devices, which have
  74. the following parameters (and these are checked when device type is determined
  75. to be floppy or not):
  76.  
  77. - number of surfaces must be 2
  78.  
  79. - starting cylinder (LowCyl) *must* be 0
  80.  
  81. - ending cylinder (HighCyl) must not be higher than 81
  82.  
  83. - block per track can be any number above three (so at least four)
  84.  
  85. - block size must be standard (512 bytes)
  86.  
  87. - device must use AmigaDOS filesystem (0x444F53XX - 'DOS')
  88.  
  89. - max unit number is 3 (ranging from 0 to 3)
  90.  
  91. The  above  should  rule  out  all  harddisks  (if  you want to format damaged
  92. harddisk  use  BFormat  or  Quarterback), CDROMs, etc. AllowBad works (and has
  93. been  tested)  with  trackdisk  (DFx:)  and  diskspare [(c) 1992-1994 by Klaus
  94. Deppisch]  (DSx:) devices. It should support all possible future devices which
  95. comply to the specs mentioned.
  96.  
  97. The  program  is  aware of high density (HD) floppies and should support them,
  98. but unfortunately I was unable to test it (hence the ßeta status of AllowBad).
  99. Please,  report  all the possible bugs to the address found at the end of this
  100. document.
  101.  
  102. You  can  format  RAD:  device  with AllowBad (as long as it complies to above
  103. specs) but this does not make much sense.
  104.  
  105. Requirements
  106. ------------
  107.  
  108. As  most  of  nowadays  programs,  AllowBad  requires at least version 2.04 of
  109. operating  system.  Reasons are obvious: it is much easier for programmer (me)
  110. to  code  the  whole thing and AllowBad works only with FFS types of disk (1.3
  111. doesn't support FFS floppies directly). If you want to use DIRCACHE filesystem
  112. you  need  OS  3.0 or higher (however AllowBad can format dircache disks under
  113. 2.04, too).
  114.  
  115. AllowBad  also  requires  some  free memory; its amount depends on device. For
  116. further details see 'Way of operation' section.
  117.  
  118. Limitations
  119. -----------
  120.  
  121. AllowBad  is  somehow  a  little bit more tollerant than other programs of its
  122. kind - it can properly format and initialize disks, which have tracks 0 and\or
  123. root damaged! The only requirement for such disks is the ability to read\write
  124. first  two  block on track 0 (ie. bootblocks) and one block on middle track of
  125. disk  (ie.  rootblock). So, if you have for example the disk which has damaged
  126. only  block  number  3,  there  is  a  good  chance  AllowBad  will be able to
  127. initialize  this disk and make it available for file storage (with low side of
  128. track  0  allocated as bad). But remember: such a disk is extremely vulnerable
  129. and unstable. Be sure not to store any important files on it!
  130.  
  131. This  version  of  AllowBad  is meant as a CLI command and cannot be used from
  132. Workbench (it has no GUI, so no pain I think).
  133.  
  134. Usage
  135. -----
  136.  
  137. Standard template (can be obtained via use of question mark) looks like this:
  138.  
  139. AllowBad DRIVE/K/A,NAME/K/A,INTL=INTERNATIONAL/S,DIRCACHE/S:
  140.  
  141. As you can see only two parameters must be specified - drive name and name you
  142. want  your  disk  to have. Drive name is standard doslevel device name such as
  143. 'df0:',  'ds1:', etc., case insensitive. Must end with colon. Name of the disk
  144. must  not  exceeded  30  chars  (this  limit  is imposed by current version of
  145. AmigaDOS).  Names  longer than permitted will simply be truncated. If you want
  146. the  filename to contain spaces, you must use quotes. Remaining two parameters
  147. are  optional  and  pertain  to type of filesystem used while initializing the
  148. disk.  INTL (equivalent to INTERNATIONAL) denotes INTL FFS (DOS3) and DIRCACHE
  149. -  DC  FFS  (DOS5),  respectively.  If  you  use both of them at the same time
  150. DIRCACHE  will  be  used  (DC  implies  INTL anyway). When none of switches is
  151. present the disk will be formatted with default normal FFS (DOS1).
  152.  
  153. For  some  technical reasons OFS types of filesystem are not supported. I hope
  154. you can live with it however.
  155.  
  156. While  formatting,  the program can be interrupted with CTRL-c. If this is so,
  157. execution  is  terminated  with  RC  (return  code) set to 5 (WARN) and mesage
  158. '***BREAK' is printed.
  159.  
  160. Way of Operation
  161. ----------------
  162.  
  163. At  start  AllowBad  checks  whether the parameters issued by user are correct
  164. (they are  obtained through  standard  ReadArgs() function). At this analizing
  165. stage,  availability  of  disk  unit is also confirmed. If disk is not in use,
  166. AllowBad  immediately allocates it (by Inhibit() function). Else program quits
  167. with  error  message  'AllowBad failure: object is in use'. Unfortunately some
  168. programs  (such  as  great disk editor DPU 1.5 or recovery utility Quarterback
  169. Tools  2.2)  ignore  the  fact that the drive is inhibited by someone else and
  170. allow  you to work with such a drive.  This could lead to interference between
  171. those  programs  and  AllowBad, resulting in incorrectly formatted/initialized
  172. disks.  This is NOT my fault, but programmers of those utilities! My advice is
  173. not to use any disk utility while AllowBad executes.
  174.  
  175. If  everything  went  okay  (and  there  is a write-enabled disk in drive) two
  176. memory  buffers  are allocated (and these are the only memory allocations made
  177. by  the  program)  -  first  buffer  is  the  three times of one track in size
  178. (calculated as follows: 3*BlocksPerTrack*512), and the second one is 83 bytes.
  179. Thus  currently  the  most 'memory-hungry' situation I can think of will be HD
  180. disk  formatted  using  diskspare.device [(c) 1992-1994 by Klaus Deppisch]. In
  181. this  case  AllowBad will need 3*24*512+84 (= 36948) bytes of free memory. The
  182. kind  of  allocated  memory (chip, public, etc.) depends of flags parameter in
  183. device's  FileSysStartupMsg  (you  can  specify  it in BufMemType parameter in
  184. mountlist).
  185.  
  186. Because  Allowbad  is  system  friendly,  it  uses  standard  device calls for
  187. accessing  the  disk  (via  IORequest). First, each track of disk is formatted
  188. (using  command  #11 - FORMAT) with special data pattern. Then (after flushing
  189. device  buffers for reliability) contents of this track is read back from disk
  190. and  compared with pattern data. If operation is successful, the same track is
  191. written with zeros and once again verified. During all of this program informs
  192. briefly  about  what  is  going  on. Each error encountered is notified in the
  193. second  buffer  and  the  appropriate  message  is diplayed. Each track can be
  194. accessed  up  to  four  times,  so  AllowBad  undoubtedly  is  not the fastest
  195. formatter  around.  But when dealing with corrupted media, reliability is what
  196. counts, not time.
  197.  
  198. When  formatting  completes,  AllowBad attempts to initialize the disk - first
  199. boot  blocks  are  written  (and  verified) then so is root. If above could be
  200. done,  disk state info (as obtained during format stage) is analyzed and place
  201. for  other control blocks is determined. These blocks include: - dircache info
  202. block  (if  DIRCACHE  switch was specified), bitmap block, file info block and
  203. eventually  some  file  extension  blocks.  The last two can be needed only if
  204. there were errors detected.
  205.  
  206. AllowBad  masks  corrupted areas using dummy file which pretends to occupy all
  207. the  bad  tracks.  This keeps the AmigaDOS filesystems from using those places
  208. and  you  can store files the same way as on good (error free) disks. To avoid
  209. confusion  the  file  is  protected from reading, updating, deleting, etc. and
  210. should  remain as such (don't play with this file - it IS completely faked and
  211. does not contain anything intreresting!) The name of the file is 'dummy.bad'.
  212.  
  213. Because of way AllowBad works (and I can't think of anything better, can you?)
  214. disks  prepared  by  it  can  *only*  be  used  under DOS, even that with some
  215. limitations.  Don't  try to diskcopy to such a disk! Use DOS command 'copy' or
  216. any  file managing program instead. Also, don't try to optimize bad disks with
  217. Reorg  or  like.  If  you  want  fast  directory listings use dircache (OS 3.0
  218. rules!)  And  remember that AllowBad DOES NOT repair anything - it only allows
  219. bad disks to be used while they actually still remain bad!
  220.  
  221. On  completion AllowBad informs you about number of blocks allocated (this not
  222. includes boot, root, DC, bitmap and FIB blocks).
  223.  
  224. Bugs
  225. ----
  226.  
  227. During  my  tests (well, not very intensive) no bugs were detected, which does
  228. not  mean  there  aren't  any.  If  you  find  any error or have some ideas of
  229. improvement  (or  if you simply wanna chat a little, receive the source, etc.)
  230. please contact me!
  231.  
  232. Contact address
  233. ---------------
  234.  
  235. Unfortunately,  I  still  have  no direct access to Internet (must buy a modem
  236. first) so you can reach me only by snail mail, sorry. Here is my address:
  237.  
  238.                               Mikolaj Calusinski
  239.                             ul. Olsztynska 113/117
  240.                               42-200 Czestochowa
  241.                                     POLAND
  242.  
  243.  
  244.  
  245. I hope you find this little proggy useful. Have fun!
  246.                                                             Mike.
  247.  
  248.            ------------> AMIGA - THE BEST COMPUTER EVER <------------
  249.